/**
 * @filename:Const 2017年8月01日
 * @project 微面    边鹏  V1.0
 * Copyright(c) 2017 BianP Co. Ltd. 
 * All right reserved. 
 */
package com.${page_id}.controller;

import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


import com.${dao_id}.entity.${model_name};
import com.${page_id}.service.${model_name}Service;

/**	
 * 	@explain 控制层(${model_name_cn})
 *  @author  BianP
 * 	@class   ${model_name}Controller.java
 */

@RestController
@RequestMapping("/${object}")
public class ${model_name}Controller {

	Logger logger = Logger.getLogger(${model_name}Controller.class);
	@Autowired
	public ${model_name}Service ${object}ServiceImpl;
	
	/**
	 * @explain 获取${model_name_cn}
	 * @param   ${model_name_cn}ID:id
	 * @return  ${model_name}
	 * @author  BianP
	 */
	@ResponseBody
	@RequestMapping(value="/getById", method = RequestMethod.GET)
	public Object getById(HttpServletRequest request,Long id){
		
		${model_name} ${object} = ${object}ServiceImpl.selectByPrimaryKey(id);
				
		return ${object};
	}
}
